home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / util1 / setpatch.lha / SetPatch40.16 / Update_SetPatch < prev    next >
Text File  |  1995-09-08  |  3KB  |  98 lines

  1. ; $VER: Update_SetPatch 40.16 (08.09.95)
  2.  
  3. failat 21
  4. set setpatch_version 40
  5. set setpatch_revision 16
  6. set checkfor_version 38
  7. set checkfor_module "c:IPrefs"
  8. set setpatch_source "SetPatch_${setpatch_version}.${setpatch_revision}"
  9. set setpatch_target c:SetPatch
  10. set install_setpatch 0
  11.  
  12. echo "*N  SetPatch ${setpatch_version}.${setpatch_revision} Installation"
  13. echo "  ===========================*N"
  14. echo "  This script will update your SetPatch to"
  15. echo "  version ${setpatch_version}.${setpatch_revision} if you have an older version.*N"
  16. echo "  This SetPatch is for systems running V${checkfor_version} or higher."
  17. echo "  You will be asked for permission before proceeding...*N"
  18. echo "  Examining your system...*N"
  19.  
  20. version >NIL: ${checkfor_module} ${checkfor_version}
  21. if warn
  22.     echo "  This SetPatch is for systems with AmigaOS ${checkfor_version} or higher."
  23.     echo "  Your system appears to be running an older OS."
  24.     echo "  Please consider upgrading to the most recent OS available."
  25.     skip finished
  26. endif
  27.  
  28. check2090
  29. set has2090 $RC
  30.  
  31. if $has2090 EQ 1    ; 2090A
  32.     echo "  2090A hard disk controller detected."
  33.     set setpatch_target Boot:c/SetPatch
  34. endif
  35. if $has2090 EQ 2    ; 2090 - non-autoboot
  36.     echo "  2090 hard disk controller detected."
  37.     set setpatch_target df0:c/SetPatch
  38.     ask "  Please insert your boot floppy into df0:"
  39. endif
  40.  
  41. if not exists ${setpatch_target}
  42.     echo "  Error:  Can't find your old SetPatch..."
  43.     skip finished
  44. endif
  45. if not exists ${setpatch_source}
  46.     echo "  Error:  Can't find the new SetPatch..."
  47.     skip finished
  48. endif
  49.  
  50. if "`version ${setpatch_source}`" NOT EQ "SetPatch ${setpatch_version}.${setpatch_revision}"
  51.     echo "  Error:  New SetPatch is not of the correct version"
  52.     skip finished
  53. endif
  54.  
  55. version ${setpatch_target} version `eval ${setpatch_version}+1` >NIL:
  56.  
  57. if warn
  58.     version ${setpatch_target} version ${setpatch_version} >NIL:
  59.     if warn
  60.         ask "  Your SetPatch needs updating.  Do you wish to proceed?"
  61.         if warn
  62.             set install_setpatch 1
  63.         else
  64.             skip finished
  65.         endif
  66.     else
  67.         version ${setpatch_target} revision ${setpatch_revision} >NIL:
  68.         if warn
  69.             ask "  Your SetPatch needs updating.  Do you wish to proceed?"
  70.             if warn
  71.                 set install_setpatch 1
  72.             else
  73.                 skip finished
  74.             endif
  75.         else
  76.             echo "  You do not need this update, because you already have `version ${setpatch_target}`."
  77.         endif
  78.     endif
  79. else
  80.     echo "  You do not need this update, because you already have `version ${setpatch_target}`."
  81. endif
  82.  
  83. lab finished
  84. if ${install_setpatch} eq 1
  85.     echo "  Updating to SetPatch ${setpatch_version}.${setpatch_revision}..."
  86.     copy ${setpatch_source} ${setpatch_target}
  87.     echo "*N  Reboot your system to have the new SetPatch take effect"
  88.     echo "*N  ****** Done ******"
  89. else
  90.     echo "*N  ****** Done (SetPatch not installed) ******"
  91. endif
  92. unset setpatch_version
  93. unset setpatch_revision
  94. unset setpatch_source
  95. unset setpatch_target
  96. unset install_setpatch
  97. unset has2090
  98.